import request from '../utils/request'

// 动态消息
export const dynamic = (pagesize) => {
  return request({
    url: '/event',
    params: {
      pagesize
    }
  })
}

// 获取用户动态

export const userEvent = (uid) => {
  return request({
    url: '/user/event',
    params: {
      uid
    }
  })
}

// 获取用户粉丝列表

export const userFolloweds = (uid) => {
  return request({
    url: '/user/followeds',
    params: {
      uid
    }
  })
}

// 获取用户关注列表
export const userFollows = (uid) => {
  return request({
    url: '/user/follows',
    params: {
      uid
    }
  })
}

// 获取热门歌手

export const hotArtists = (uid) => {
  return request({
    url: '/top/artists'
  })
}

/**
 * 关注/取消关注用户
 * 1为关注  其他为取消
 * 参数  uid t
 */

export const follow = (params) => {
  return request({
    url: '/follow',
    params
  })
}

// 获取歌手详情

export const artistDetail = (params) => {
  return request({
    url: '/artist/detail',
    params
  })
}

//  分享歌曲、歌单、mv、电台、电台节目到动态
export const share = (params) => {
  return request({
    url: '/share/resource',
    params
  })
}

// 搜索歌单

export const searchMucis = (params) => {
  return request({
    url: '/search',
    params
  })
}

// 动态点赞

export const like = (params) => {
  return request({
    url: '/resource/like',
    params
  })
}
